package com.jiawa.start.service.service_sys.controller;


import com.jiawa.start.domain.Sys_user;
import com.jiawa.start.service.service_sys.service.ISys_userService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 系统用户 前端控制器
 * </p>
 *
 * @author huang
 * @since 2021-04-18
 */
@RestController
@RequestMapping("/admin/sys_user")
public class Sys_userController {
    @Autowired
    ISys_userService sys_userService;
    @GetMapping("index")
    public List<Sys_user> index(){
        List<Sys_user> list = sys_userService.list();
        return  list;
    }

    @PostMapping("create")
    public boolean create (@RequestBody Sys_user sys_user){
        return sys_userService.save(sys_user);
    }


}

